<?php

use yii\db\Migration;
use yii\db\Schema;

class m170619_055659_EDIT_ORDER_CONTACT_COLUMN extends Migration
{
    public function up()
    {

         //$this->alterColumn('{{cruise}}', 'first', Schema::TYPE_STRING. "(16) null  COMMENT '首航时间' ");
         $this->addColumn('{{order_contact}}', 'company', Schema::TYPE_STRING. "(128) null COMMENT '公司名称' ");
		 $this->dropColumn('{{order_contact}}', 'order_id');
		 $this->dropColumn('{{order_contact}}', 'customer_id');
    }

    public function down()
    {
        echo "m170619_055659_EDIT_ORDER_CONTACT_COLUMN cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
